package main.java.day09;
/**
 * 使用线程方式一创建两个线程:分别输出1000次，你好和再见
 * @author Xiloer
 *
 */
public class Test01 {
    public static void main(String[] args) {
        Thread thread=new Mythread();
        Thread thread1=new Mythread1();
        thread.start();
        thread1.start();
    }


}
class   Mythread extends  Thread{

    @Override
    public void run() {
        for (int i = 0; i <1001; i++) {
            System.out.println("你好");
        }

    }
}
class Mythread1 extends Thread{

    @Override
    public void run() {
        for (int i = 0; i <1001; i++) {
        System.out.println("再见");
    }

    }
}